﻿<phone:PhoneApplicationPage 
    x:Class="WP7Square.Tips"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    d:DataContext="NearbyTipsViewModelSampleData.xml">

    <Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="304"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <StackPanel Margin="0 0 0 0" Height ="170">
                <TextBlock x:Name="ApplicationName" Text="Tips" Style="{StaticResource MainMenuItemTitleStyle}"/>
                <TextBlock x:Name="ExplanationText" 
                           Text="see what other people have said about places and things near you. Not yet implemented"
                           TextWrapping="Wrap" 
                           Style="{StaticResource DoubleLineListSubTitleTextStyle}" 
                           Margin="10 10 0 0"/>
            </StackPanel>
        </Grid>

        <Grid Grid.Row="1" Margin="0 10 0 0">
            <ListBox x:Name="TipsList"
                     Height="Auto" 
                     ItemsSource="{Binding Items}"
                     SelectionChanged="TipsList_SelectionChanged"
                     Style="{StaticResource ListBoxStyle}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1, 0.5">
                                    <GradientStop Color="Black" Offset="0.85" />
                                    <GradientStop Color="Transparent" Offset="0.95" />
                                </LinearGradientBrush>
                            </StackPanel.OpacityMask>
                            <StackPanel>
                                <TextBlock Width="390" Text="{Binding Message}" Style="{StaticResource TripleLineListTitleTextStyleLarge}"/>
                                <TextBlock Width="390" Text="{Binding SubmitterId}" Style="{StaticResource TripleLineListTitleTextStyleMedium}"/>
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
    
    <!-- none of these are wired up yet, remove for now. 
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar  IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBar.Buttons>
                <shell:ApplicationBarIconButton IconUri="images/dark/refresh.png" Click="ApplicationBarRefresh_Click" Text="Refresh" />
                <shell:ApplicationBarIconButton IconUri="Images/dark/add.png" Click="ApplicationBarAdd_Click" Text="Add"/>
                <shell:ApplicationBarIconButton IconUri="Images\dark\badge.png" Click="ApplicationBarBadge_Click" Text="Badges"/>
            </shell:ApplicationBar.Buttons>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
    -->
</phone:PhoneApplicationPage>